<table border="1">
	<tr><th colspan="5">Planes</th></tr>
	<tr><th>Nombre</th><th>Ini</th><th>Fin</th><th>Vip</th><th>Forma de pago</th></tr>
	<%n=0%>	
<% if not @persona.plan_vigente? then %>
	<%n+=1%>
	<tr><td colspan="5"><b>No tiene plan vigente</b></td></tr>
<% end %>

	<%	@plans = @persona.plans.find(:all, :order=>'fin desc')%>
	<%	 	for plan in @plans %>
	<%n+=1%>
			<tr class="row<%=n%2%>">
				<td>
					<%= link_to h(plan.nombre), { :action => 'edit', :controller => 'plans', :id => plan}, :method => :post %>
				</td>
				<td><%=h  plan.ini.strftime(DATE_FMT) %></td>
				<td><%=h  plan.fin.strftime(DATE_FMT) %></td>
				<td>
					<% if plan.vip then %>
						Si
					<% else %>
						No
					<% end %>
				</td>
				<td><%=h plan.forma.nombre if plan.forma%></td>
			</tr>
		<% 	end	%>
		<tr><td  colspan="5">
			<%=  link_to 'Agregar Plan', { :action => 'new', :controller => 'plans', :plan_alumno => @persona }, :method => 'post' %>
		</td></tr>
</table>
